package com.byteshake.ddoffice.model.http.api

import com.byteshake.common.base.BaseData
import com.byteshake.ddoffice.model.bean.Article
import com.byteshake.ddoffice.model.bean.Banner
import com.byteshake.ddoffice.model.bean.LoginUserInfo
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path


interface DDOfficeApi {

    @POST("echo")
    suspend fun echo(@Body params: Map<String, String>) : BaseData<String>

    @GET("banner/json")
    suspend fun getBanner(): BaseData<List<Banner>>

    /**
     * @param mobile  arecode  platform
     */
    @POST("sendCode")
    suspend fun sendCode(@Body params: Map<String, Any>)

    /**
     * @param mobile  arecode  platform pwd
     */
    @POST("login")
    suspend fun login(@Body body: RequestBody) : BaseData<LoginUserInfo>

    /**
     * @param mobile  arecode  platform verifyCode
     */
    @POST("register")
    suspend fun register(@Body params: Map<String, Any>)

}